package org.cloudplatform.common.feign.register;

import org.cloudplatform.common.feign.model.Instance;

import java.util.List;
import java.util.Set;

/**
 * 类描述：用户注册服务实例到本地缓存，和提供相应获取服务实例的接口
 * 作者：徐卫超 (cc)
 * 时间 2022/5/13 17:53
 */
public interface InstanceRegister {

    boolean register(Instance instance);

    boolean remove(Instance instance);

    boolean update(Instance instance);

    boolean registerAll(List<Instance> instances);

    boolean removeServiceName(String serviceName);

    boolean updateServiceName(String serviceName, List<Instance> instances);

    List<Instance> serviceInstance(String serviceName);


    Set<String> serviceNames();

}
